package com.example.abc.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.List;
import java.util.Random;

/**
 * Created by Peter on 2018/4/24.
 */
@Controller
public class ErrorController {
    public static final Logger logger = LoggerFactory.getLogger(IndexController.class);

    @RequestMapping(value = "/error", method = {RequestMethod.POST, RequestMethod.GET})
    public String error(Model model) {
        logger.info("error");
        model.addAttribute("error","login error.");
        return "error";
    }

}
